<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('修改福利缴纳变动')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-editable-css"/>
    <th:block th:include="include :: container-css"/>

</head>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-accuBaseAdjustment-edit"  AUTOCOMPLETE="OFF">
        <input id="id" name="id" type="hidden" th:value="${AccuBaseAdjustment['id']}" />
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">工号：</label>
                <div class="col-sm-9">
                    <input type="text" name="badge" id="badge" class="form-control"
                           th:value="${AccuBaseAdjustment['badge']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-9">
                    <input type="text" name="name" id="name" class="form-control"
                           th:value="${AccuBaseAdjustment['name']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">公司名称：</label>
                <div class="col-sm-9">
                    <input type="text" name="compName" id="compName" class="form-control"
                           th:value="${AccuBaseAdjustment['compName']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">部门名称：</label>
                <div class="col-sm-9">
                    <input type="text" name="depName" id="depName" class="form-control"
                           th:value="${AccuBaseAdjustment['depName']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">工作岗位：</label>
                <div class="col-sm-9">
                    <input type="text" name="jobName" id="jobName" class="form-control"
                           th:value="${AccuBaseAdjustment['jobName']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">福利缴纳状态：</label>
                <div class="col-sm-9">
                    <input type="text" name="benefitStatus" id="benefitStatus" class="form-control"
                           th:value="${AccuBaseAdjustment['benefitStatus']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">社保缴纳地区：</label>
                <div class="col-sm-9">
                    <input type="text" name="benefitCity" id="benefitCity" class="form-control"
                           th:value="${AccuBaseAdjustment['benefitCity']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">生效日期：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control laydate-demo-2"
                           th:value="${AccuBaseAdjustment['effectdate']}"
                           name="effectdate" id="effectdate" placeholder="yyyy-MM-dd">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">登记人：</label>
                <div class="col-sm-9">
                    <input type="text" name="regbyName" id="regbyName" class="form-control"
                           th:value="${AccuBaseAdjustment['regbyName']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">登记时间：</label>
                <div class="col-sm-9">
                    <input type="text" name="regTime" id="regTime" class="form-control"
                           th:value="${AccuBaseAdjustment['regTime']}" disabled="disabled">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-9">
                    </textarea>
                    <input type="text" name="remark" remark="xx" class="form-control"
                           th:value="${AccuBaseAdjustment['remark']}">
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">原公积金基数：</label>
                <div class="col-sm-9">
                    <input type="text" name="oldXvalue" id="oldXvalue" class="form-control"
                           th:value="${AccuBaseAdjustment['oldXvalue']}" disabled="disabled">
                </div>
            </div>
        </div>

        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">新公积金基数：</label>
                <div class="col-sm-9">
                    <input type="text" name="Xvalue" id="Xvalue" class="form-control"
                           th:value="${AccuBaseAdjustment['Xvalue']}">
                </div>
            </div>
        </div>









    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<th:block th:include="include :: hr-help-js"/>

<script th:inline="javascript">
    console.log([[${AccuBaseAdjustment}]]);
    var prefix = ctx + 'welfare/welfarebaseadjustment/accubaseadjustment';
    $(function () {
        $(".datetimepicker-demo-2").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-2',
                type: 'date'
            });

        });


    });

    function submitHandler() {
        edit();
    };

    function edit() {
        if ($.validate.form()) {
            var data = $("#form-accuBaseAdjustment-edit").serializeArray();
            var id = $("input[name='id']").val();
            var remark = $("#remark").val();
            var Xvalue = $("input[name='Xvalue']").val();
            var effectdate = $("input[name='effectdate']").val();

            data.push({"id": "id", "value": id});
            data.push({"id": "remark", "value": remark});
            data.push({"id": "Xvalue", "value": Xvalue});
            data.push({"id": "effectdate", "value": effectdate});


            $.operate.save(prefix + "/edit", data);
        }
    }

</script>
</body>
</html>